
public class Sensor {

	private double position_x;
	private double position_y;
	
	public Sensor()
	{
		
	}
	
	public Sensor(double x, double y)
	{
		position_x = x;
		position_y = y;
	}
	
	public double distToLight(Light light) {
		return Math.sqrt(Math.pow((light.getPosX()-this.position_x), 2) + Math.pow((light.getPosY()-this.position_y), 2));
	}
	
	public double output(Light light) {
		return light.getIntensity() / distToLight(light);
	}
	
	public double getPosX()
	{
		return position_x;
	}
	
	public double getPosY()
	{
		return position_y;
	}
	
	public void setPosX(int x)
	{
		position_x = x;
	}
	
	public void setPosY(int y)
	{
		position_y = y;
	}
	 
}
